<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Theron: Theron::DefaultAllocator::GetAllocationCount</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Theron
   &#160;<span id="projectnumber">6.00.02</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceTheron.html">Theron</a></li><li class="navelem"><a class="el" href="classTheron_1_1DefaultAllocator.html">DefaultAllocator</a></li>  </ul>
</div>
</div><!-- top -->
<div class="contents">
<table cellspacing="0" cellpadding="0" border="0">
  <tr>
   <td valign="top">
      <div class="navtab">
        <table>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1DefaultAllocator_aa48cb1758a7f85de84b15047484dfb08.html#aa48cb1758a7f85de84b15047484dfb08">Allocate</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1DefaultAllocator_ad649f26a87a1e43c0cf539b5914a974a.html#ad649f26a87a1e43c0cf539b5914a974a">AllocateAligned</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1DefaultAllocator_ad0f15268d1f4f5bef6287560d0aab262.html#ad0f15268d1f4f5bef6287560d0aab262">DefaultAllocator</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1DefaultAllocator_af0dab9d5e8c021d3eaf60bbfcbdcb0d9.html#af0dab9d5e8c021d3eaf60bbfcbdcb0d9">Free</a></td></tr>
          <tr><td class="navtab"><a class="qindexHL" href="classTheron_1_1DefaultAllocator_a7aa1fb21aa04f2924e30d4eda10e2c43.html#a7aa1fb21aa04f2924e30d4eda10e2c43">GetAllocationCount</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1DefaultAllocator_a368812ccfd6bf1780a9b74360b239826.html#a368812ccfd6bf1780a9b74360b239826">GetBytesAllocated</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1DefaultAllocator_a42b6356c075558e513648eae05df21cb.html#a42b6356c075558e513648eae05df21cb">GetPeakBytesAllocated</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1DefaultAllocator_a9ad5a3063a263e545f3a3c04189b0074.html#a9ad5a3063a263e545f3a3c04189b0074">GUARD_VALUE</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="classTheron_1_1DefaultAllocator_afda3ddc78b12ed2ad1df5a5c12c26be7.html#afda3ddc78b12ed2ad1df5a5c12c26be7">~DefaultAllocator</a></td></tr>
        </table>
      </div>
   </td>
   <td valign="top" class="mempage">
<a class="anchor" id="a7aa1fb21aa04f2924e30d4eda10e2c43"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceTheron_a254da7d1d07833b997828500fbf73daa.html#a254da7d1d07833b997828500fbf73daa">uint32_t</a> Theron::DefaultAllocator::GetAllocationCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the number of distinct allocations performed by the allocator. </p>
<p>Returns the total number of calls to <a class="el" href="classTheron_1_1DefaultAllocator_aa48cb1758a7f85de84b15047484dfb08.html#aa48cb1758a7f85de84b15047484dfb08">Allocate</a> or <a class="el" href="classTheron_1_1DefaultAllocator_ad649f26a87a1e43c0cf539b5914a974a.html#ad649f26a87a1e43c0cf539b5914a974a">AllocateAligned</a>.</p>
<div class="fragment"><div class="line"><a class="code" href="classTheron_1_1IAllocator.html">Theron::IAllocator</a> *<span class="keyword">const</span> allocator = <a class="code" href="classTheron_1_1AllocatorManager_ae9038770699e0ff14c0dd68378e8ad90.html#ae9038770699e0ff14c0dd68378e8ad90">Theron::AllocatorManager::GetAllocator</a>();</div>
<div class="line"><a class="code" href="classTheron_1_1DefaultAllocator.html">Theron::DefaultAllocator</a> *<span class="keyword">const</span> defaultAllocator = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classTheron_1_1DefaultAllocator.html">Theron::DefaultAllocator</a> *<span class="keyword">&gt;</span>(allocator);</div>
<div class="line"></div>
<div class="line"><span class="keywordflow">if</span> (defaultAllocator)</div>
<div class="line">{</div>
<div class="line">    printf(<span class="stringliteral">&quot;Default allocator performed %d allocations\n&quot;</span>, defaultAllocator-&gt;<a class="code" href="classTheron_1_1DefaultAllocator_a7aa1fb21aa04f2924e30d4eda10e2c43.html#a7aa1fb21aa04f2924e30d4eda10e2c43">GetAllocationCount</a>());</div>
<div class="line">}</div>
</div><!-- fragment --><p>This method is only useful when allocation checking is enabled using <a class="el" href="Defines_8h_ad51a5513a03bbbac961f4a559b2f6fcc.html#ad51a5513a03bbbac961f4a559b2f6fcc">THERON_ENABLE_DEFAULTALLOCATOR_CHECKS</a> (enabled, by default, in debug builds). If allocation checking is disabled then GetAllocationCount returns zero.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classTheron_1_1DefaultAllocator_a42b6356c075558e513648eae05df21cb.html#a42b6356c075558e513648eae05df21cb" title="Gets the peak number of bytes ever allocated by the allocator at one time. ">GetPeakBytesAllocated</a> </dd></dl>

</div>
</div>
    </td>
  </tr>
</table>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
